import { defineStore } from 'pinia'
import { ref } from 'vue'

const useLoginStore = defineStore(
  'login',
  () => {
    const token = ref<string>(
      'Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3N1ZVRpbWUiOjE3MTU3MzU4ODA3MDksImp3dEtleSI6IlNFQVJDSF9JTkZPUk1BVElPTjpKV1RfTE9HSU5fS0VZOjg1YmI4NzE5ZTYxNjRkYTY5N2I5MGMzNTlmMmVjMjNmIn0.6V3h1zOBYfP4keqpSCivVhkwijMjJutcepiuQ7qYKS8'
    )

    const num = ref<number>(1)

    return {
      token,
      num
    }
  },
  {
    persist: {
      storage: sessionStorage
    }
  }
)

export default useLoginStore
